from poium import Page, Element

class LoginPre(Page):
    Login_button = Element(css='span[data-type="tuzhan"]')
    user_name = Element(css='[placeholder="请输入你的登录账户"]')
    Pass_word = Element(css='[placeholder="请输入密码"]')
    Confirm_button = Element(css='button.g-btn.login-btn.do-btn')

    def login(self, username, password):
        self.Login_button.click()
        self.user_name.input(username)
        self.Pass_word.input(password)
        self.Confirm_button.click()
